docs: move (platform) network information fields from DIP-00{03, 04, 28} to Appendix C of DIP-0003, minor cleanup#162
Merged
thephez merged 8 commits intodashpay:masterfrom May 27, 2025
Conversation
thephez
reviewed
May 1, 2025
thephez
reviewed
May 1, 2025
Collaborator
thephez
left a comment
There was a problem hiding this comment.
Looks good. Just a couple suggestions/questions to consider.
Collaborator
|
#163 is merged now. I like the SML table consolidation btw. Simplifies the reading experience 👍 |
Type 0 masternodes are referred to as "default" and "regular" in different documents, let's harmonize them.
UdjinM6
previously approved these changes
May 6, 2025
thephez
reviewed
May 7, 2025
UdjinM6
previously approved these changes
May 7, 2025
knst
reviewed
May 11, 2025
thephez
approved these changes
May 20, 2025
Comment on lines
+99
to
+110
| | Field | Type | Size | Description | Presence condition | | ||
| | ---------------- | --------- | -------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------- | | ||
| | nVersion | uint16_t | 2 | Version of the SML entry | `PROTOCOL_VERSION` >= `70228` | | ||
| | proRegTxHash | uint256 | 32 | The hash of the ProRegTx that identifies the masternode | _Always present_ | | ||
| | confirmedHash | uint256 | 32 | The hash of the block at which the masternode got confirmed | _Always present_ | | ||
| | networkInfo | byte[] | variable | Masternode addresses (see [appendix](dip-0003.md#appendix-c-network-information)) | _Always present_ | | ||
| | pubKeyOperator | BLSPubKey | 48 | The operators public key | _Always present_ | | ||
| | keyIDVoting | CKeyID | 20 | The public key hash used for voting. | _Always present_ | | ||
| | isValid | bool | 1 | True if a masternode is not PoSe-banned | _Always present_ | | ||
| | type | uint_16 | 0 or 2 | Masternode type. 0 for regular masternode, 1 for evonode. | `PROTOCOL_VERSION` >= `70227` and `nVersion` == 2 | | ||
| | platformHTTPPort | uint_16 | 0 or 2 | TCP port of Platform HTTP/API interface (network byte order). Only present for masternode type 1. | `PROTOCOL_VERSION` >= `70227` and `nVersion` == 2 | | ||
| | platformNodeID | byte[] | 0 or 20 | Dash Platform P2P node ID, derived from P2P public key. Only present for masternode type 1. | `PROTOCOL_VERSION` >= `70227` and `nVersion` == 2 | |
Collaborator
There was a problem hiding this comment.
Nit: I really dislike the extraneous space that ai adds to markdown tables
Collaborator
PastaPastaPasta
approved these changes
May 27, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
As preparation for introduction of the extended addresses specification to DIP-0003, this pull request does the following:
Deduplicate references to
ipAddressandport(used to define the publicly advertised address of a masternode) to an appendix as they're present in both ProTx and SML structures and replacing it with a reference to an opaque fieldnetworkInfo.Deduplicate references to
platform{P2P,HTTP}Port(used to define the port used in combination withipAddressmentioned earlier to define publicly advertised addresses of a platform services) to the same appendix as they're present in ProTx structures and referenced in DIP-0028 and replacing it with a reference to an opaque fieldplatformNetInfo.platformHTTPPortAdditional Information
Dependency for docs: document the extended addresses format in Appendix C of DIP-0003, add new {ProTx, SML} version to support it, add deprecation notices #164
The "network byte order" description for
platform{P2P,HTTP}Porthas been dropped as this does not reflect the implementation as it stands. To illustrate, theportinnetworkInfois stored as aCServicein Dash Core and uses the following serialization (as of v22.1.2, source)Compared to how
platform{P2P,HTTP}Portis serialized inCProUpServTx(source)